import java.math.BigInteger;

/*
    合并检测
 */
public class test3 {
    public static void main(String[] args) {
        int sum = 10000;
        int count = 0;
        while (sum >= 600){
                count++;
                sum = sum - 600;
                count++;
                sum = sum + 300;
        }
        System.out.println(count * 60 + sum/10);
    }
}
